package com.cn.topAndFoot.controller;

import com.cn.common.pojo.ResultModel;
import com.cn.topAndFoot.service.CompanyService;
import com.cn.topAndFoot.service.impl.RedisService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("aaa")
public class TopFromRedisController {
    @Autowired
    private RedisService redisService;
    @Autowired
    CompanyService companyService;
    @GetMapping("bbb")
    public ResultModel bbb(){
        ResultModel model = redisService.TopFromRedis();
        return model;
    }
    @RequestMapping("ccc")
    public ResultModel bb(){
        return redisService.aa();
    }
    @ApiOperation("公司信息")
    @GetMapping("foot")
    public ResultModel company(){
        ResultModel company = companyService.getCompany();
        return company;
    }

}
